<?php

/**
 * FileName: Model.php
 * Author: @163.com
 * DateTime: 2022-09-20 下午 07:32
 * Summary:
 */


namespace App\Models;


use Illuminate\Database\Eloquent\Model;


/**
 * App\Models\BasicModel
 *
 * @method static \Illuminate\Database\Eloquent\Builder|BasicModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|BasicModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|BasicModel query()
 * @mixin \Eloquent
 */
class BasicModel extends Model
{
    protected $guarded = [];

    protected $hidden = [
        //'updated_at',
        'deleted_at',
    ];

    /**
     * 为 array / JSON 序列化准备日期格式
     *
     * @param \DateTimeInterface $date
     * @return string
     */
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}
